As a ghost, you can only think thoughts you had while you were alive. The only ghosts who know they're ghosts are people who already thought they were.